I would recommend to use nodes and their coordinates to draw the lines and not to do this manually. TikZ allows you to write \node \bgroup .. \egroup; instead of \node { .. }; and therefore you can wrap a node and the whole tikzpicture around the content of an environment. If you use font size specific units, i.e. ex and em, the whole box will scale nicely with the font size:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\xdefinecolor{mycolor}{RGB}{62,96,111} % Neutral Blue
\colorlet{bancolor}{mycolor}
\def\bancolor{mycolor}
\newenvironment{mybox}[3][]{%
\begin{tikzpicture}[#1]%
\def\myboxname{#3}%
\node [draw,inner sep=1.5ex,text width=#2]% good options: minimum height, minimum width
(BOXCONTENT) \bgroup\rule{0pt}{3ex}\ignorespaces
}{%
\egroup;
\node [right,inner xsep=1em,fill=bancolor!75,outer sep=0pt,text height=2ex,text depth=.5ex] (BOXNAME)
at ([shift={(-1em,0pt)}]BOXCONTENT.north west) {\myboxname};
\fill[bancolor] (BOXNAME.north east) -- +(-1em,1em) -- +(-1em,0) -- cycle;
\fill[bancolor] (BOXNAME.south west) -- +(1em,-1em) -- +(1em,0) -- cycle;
\end{tikzpicture}
}
\begin{document}
\begin{mybox}{10em}{Test}
This is the content
\end{mybox}
\begin{mybox}{15em}{Test it really good}
This is the longer content
This is the longer content
This is the longer content
This is the longer content
This is the longer content
\end{mybox}
\huge
\begin{mybox}{10em}{Test}
This is the content
\end{mybox}
\begin{mybox}{15em}{Test it really good}
This is the longer content
This is the longer content
This is the longer content
This is the longer content
This is the longer content
\end{mybox}
\tiny
\begin{mybox}{10em}{Test}
This is the content
\end{mybox}
\begin{mybox}{15em}{Test it really good}
This is the longer content
This is the longer content
This is the longer content
This is the longer content
This is the longer content
\end{mybox}
\end{document}

\def\bancolor{mycolor} .. \fill[\bancolor]but\tikzset{bancolor/.style={mycolor}} .. \fill[bancolor]or even better\colorlet{bancolor}{mycolor} .. \fill[bancolor]. – Martin Scharrer♦ Jul 5 '11 at 18:02